package com.app.stick.patient.controller;


import io.swagger.annotations.*;
import javax.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.app.common.core.controller.BaseController;
import com.app.common.core.domain.ApiResult;
import com.app.stick.patient.domain.BizPatientRecord;
import com.app.stick.patient.service.IBizPatientRecordService;

/**
 * 患者档案信息Controller
 *
 * @author app
 * @date 2023-12-16
 */
@Api(value = "患者档案信息", tags = {"WEB-患者档案信息接口"})
@RestController
@RequestMapping("/patient/info")
public class BizPatientRecordController extends BaseController
{
    @Resource
    private IBizPatientRecordService bizPatientRecordService;

    /**
     * 根据患者身份证号查询患者档案信息
     * @param patientCard 患者身份证号
     * @return {@link ApiResult}<{@link BizPatientRecord}>
     */
    @ApiOperation("根据患者身份证号查询患者档案信息")
    @ApiImplicitParam(name = "patientCard", value = "患者身份证号", dataType = "String", dataTypeClass = String.class, required = true)
    @GetMapping(value = "/selectPatientRecord/{patientCard}")
    public ApiResult<BizPatientRecord> selectPatientRecord(@PathVariable("patientCard") String patientCard) {
        BizPatientRecord bizPatientRecord = bizPatientRecordService.selectPatientRecord(patientCard);
        return ApiResult.ok(bizPatientRecord);
    }

}
